
from typing import Optional, List, Any
from sqlmodel import Field, Relationship, SQLModel
from sqlalchemy import event, JSON, Column, text
from sqlalchemy.types import TypeDecorator, TEXT
from enum import Enum
import json
from models.Base import BaseAndTime
from models.common import get_current_time

class EnvetEnum(Enum):
    LOGIN = "login"
    REGISTER = "register"
    FORGET = "forget"
    UPDATE = "update"


class sys_sms(BaseAndTime, table=True):
    event: EnvetEnum = Field(default=EnvetEnum.LOGIN, description="事件", index=True)
    mobile: str = Field(default="", description="手机号", index=True)
    code: str = Field(default="", description="验证码")
    times: int = Field(default=0, description="验证次数")
    ip: str = Field(default="", description="IP")




